<!DOCTYPE html>
<html lang="en">
<head>
<!--    %BC%F5%B7%CA%BC%F5%B7%CA%BC%F5%B7%CA-->
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function funA() {
            var a = document.getElementsByName("username")[0].value;
            alert(a);
        }
    </script>
</head>
<body>

<form action="/servletA" method="get">
    用户名：<input type="text" name="username" onmouseout="funA()"></input><br>
    密码：<input type="password" name="pwd"></input><br>
    <input type="submit" value="提交"></input>
</form>
</body>
</html>